using System;
using System.Collections.Generic;

namespace AIFSContentManagementSystem.DomainObjects
{
    public class Article : DataTransferObject, IParsable
	{        
        int? articleId;

        public int? ArticleId
        {
            get { return articleId; }
            set { articleId = value; }
        }

		ArticleType _articleType;
		
		public ArticleType ArticleType {
			get {
				return this._articleType;
			}
			set {
				_articleType = value;
			}
		}

        List<Criteria> _Criteria;

        internal List<Criteria> Criteria
        {
            get { return _Criteria; }
            set { _Criteria = value; }
        }

		DateTime? effectiveFrom;

        public DateTime? EffectiveFrom
        {
            get { return effectiveFrom; }
            set { effectiveFrom = value; }
        }

        DateTime? effectiveThru;

        public DateTime? EffectiveThru
        {
            get { return effectiveThru; }
            set { effectiveThru = value; }
        }

        
        bool? active;

        public bool? Active
        {
            get { return active; }
            set { active = value; }
        }

        string program;

        public string Program
        {
            get { return program; }
            set { program = value; }
        }

		public Article ()
		{
			_articleType = ArticleType.UNSET;
			fragments = new List<Fragment>();
			placeHolders = new List<PlaceHolder>();
            _Criteria = new List<Criteria>();
		}

        #region IParsable Members

        List<Fragment> fragments;
        List<PlaceHolder> placeHolders;
        
        public List<Fragment> Fragments
        {
            get { return fragments; }
            set
            {
                //do nothing. Needed for Serialization
            }
        }

        public List<PlaceHolder> PlaceHolders
        {
            get { return this.placeHolders; }
            set { this.placeHolders = value; }
        }

        #endregion
    }
}

